import request  from '@/utils/request';

import { OPS_URL } from '@/config/query';

export async function queryPage(params = { pageSize: 10, pageNum: 0 }) {
  return request(`${OPS_URL}/group/page`, params)
}

export async function queryInfoById(id) {
  return request(`${OPS_URL}/group/detail/${id}`)
}

export async function create(params) {
  return request(`${OPS_URL}/group/create`, params)
}

export async function update(params) {
  return request(`${OPS_URL}/group/modify`, params)
}

export async function remove(id) {
  return request(`${OPS_URL}/group/remove/${id}`)
}

export async function queryRoleList() {
  return request(`${OPS_URL}/role/list`)
}

export async function allotRoles(params) {
  return request(`${OPS_URL}/group/allot_roles`, params)
}
